"use strict";

const express = require("express");

const app = express();
app.get("/", function(req, res) {
  res.status(200);
});

app.get("/pets", function(req, res) {
  res.setHeader("Content-Type", "application/json");
  res.status(200)
    .json([
      {
        "id": 1,
        "name": "Owly"
      },
      {
        "id": 2,
        "name": "Crowl"
      },
      {
        "id": 3,
        "name": "Mowly"
      }
    ]);
});

app.get("/pet/1", function(req, res) {
  res.setHeader("Content-Type", "application/json");
  res.status(200)
    .json({
      "id": 1,
      "name": "Owly"
    });
});

app.listen(3000);

module.exports = app;
